/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package presentation.view.custom;

import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import vo.TaskVO;

/**
 *
 * @author zergio
 */
public class TaskRenderer extends DefaultListCellRenderer {

    public TaskRenderer() {
    }

    public Component getListCellRendererComponent(JList list, Object value,
            int index, boolean isSelected,
            boolean cellHasFocus) {

        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        TaskVO l = (TaskVO) value;
        setText(l.getName());
        //Si se completo la tarea
        if (l.getCurrentState().equals("Completado")){
            setFont(new java.awt.Font("Segoe UI Bold", 0, 14));
        }
        //Segun prioridad Cambiar Color
        return this;
    }
}
